Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Allow appealing a moderator decision through special report type #1969

Merged
merged 9 commits into from
Jan 3, 2024

Conversation

foysalit
Copy link
Contributor

@foysalit foysalit commented Dec 14, 2023

This PR implements a very basic mechanism for allowing users to appeal a moderator decision, leveraging existing lexicons and infrastructure. The expected user flow, through this feature is

  1. User creates a report of special kind (reasonType: 'reasonAppeal') on their own content (or a moderator creates that report using ozone, on behalf of the author) which sets a boolean flag appealed to true on the moderation_subject_status row
  2. The appealed column will only be set to false when a moderator emits modEventResolveAppeal
  3. Within ozone, moderators can filter the queue to easily find subjects that have been appealed

Copy link
Collaborator

@bnewbold bnewbold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(didn't code-review, just lexicon and behavior review)

Having some last-minute indecision about the "who can create an appeal for who" behavior, but I think how this PR implements it is fine, I don't have a specific alternative to propose, and we can probably change our minds later.

@@ -64,6 +64,10 @@
"type": "boolean",
"description": "Get subjects that were taken down"
},
"appealed": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think this should probably be openAppeal or currentAppeal or something more specific. I wouldn't strong-block on this but think it is the kind of thing where a good name reduces confusion the need to dig in to docs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does mirror the name of the new field on subjectStatusView. Do you think it should be updated there too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yh we also use terms like takendown for boolean flag fields so at least it's consistent. happy to rethink naming in a future pass but I think I'd want to move forward with this as is.

"lastAppealedAt": {
"type": "string",
"format": "datetime",
"description": "Timestamp referencing when the owner of the subject appealed a moderation action"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a small nit (could ignore this comment), but "owner" feels subtly weird to me here. We use "author" just below, that feels better. Or "creator".

Comment on lines 130 to 134
// Exit early if someone is trying to game the system by appealing someone else's content
if (isAppealEvent && createdBy !== subjectDid) {
return null
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the part i'm still least sure of myself, even after settling on this behavior after earlier discussion. It feels a little weird to special case like this (and re-write the createdBy elsewhere).

I think it's probably fine though, and changing the behavior probably won't be a change to Lexicons so we aren't particularly locked-in to these behaviors ("who can create appeal reports").

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, I think we can iterate on it. We might be able to push it up into authorization layer then forget about it here.

"takendown": {
"type": "boolean"
},
"appealed": {
"type": "boolean",
"description": "True Indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "True Indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators."
"description": "True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators."

@devinivy devinivy merged commit 5e7b013 into main Jan 3, 2024
11 checks passed
@devinivy devinivy deleted the appeal-report branch January 3, 2024 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants